Skip to content

fix(app-shell): publish-all seed warning says the pack sentence, not engine text - #35301

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-35141-seed-warn-pack-sentence
Nov 19, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-35141-seed-warn-pack-sentence

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread
Fixes #35141

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:首页「全部发布」和草稿预览条的发布,在示例数据(seed)载入失败时,警告提示的详情行改为语言包里的那句「示例数据未能加载。」,不再显示 seed 载入器的英文内部报错,也不再显示写死的英文「NAME: sample data failed to load」。
  • 为什么改:用中文发布的搭建者会在警告下看到英文的引擎文本;console AI build chat: the plan card shows 「已搭建」 when nothing was built, a message sent mid-turn is dropped, the draft preview shows OBJECT_NOT_FOUND, and two cards speak in agent/API terms #32984 的裁决是面向用户的文字只用客户句、不用开发者文本,AI 对话里的发布健康行早已这样做,这个入口还没跟上。
  • 风险与回滚:只改一个 hook 里警告详情取哪句话,不动接口、语言键和导出;回滚即 revert 本 PR。引擎文本从此不在该提示中出现(对话里的「技术细节」折叠仍保留它)。
  • 先看:ui/packages/app-shell/src/preview/usePublishAllDrafts.ts(seedFailed 标志与 seedWarn 那一处 toast);ui/packages/app-shell/src/preview/__tests__/usePublishAllDrafts.seedWarn-35141.test.tsx;.changeset/35141-publish-all-seed-warn-pack-sentence.md。
  • 两分钟验证:pnpm --dir ui exec vitest run packages/app-shell/src/preview/__tests__/usePublishAllDrafts.seedWarn-35141.test.tsx,预期 8 个用例全绿(en 与 zh-Hans 两种语言)。
  • 需要你做的:无,席位落地。

What changes

usePublishAllDrafts (Home's Publish all and the draft-preview bar) warns home.pendingDrafts.seedWarn when a seed fails. The warning's description used to be the first entry of a list filled from two sources that are not customer sentences:

  • the package batch: health.seedError (the seed loader's engine text) ahead of the pack sentence;
  • the package-less loop: seedApplied.error (engine text again), else a hard-coded English NAME: sample data failed to load in every locale.

The list is replaced by one seedFailed flag set from either door, and the description is always the pack sentence chatbot.build.health.seedFailed: the sentence the chat's PublishHealthLine says for the same failure (objectstack#32984 Q1 ruling: user-facing text is the customer sentence, never developer or engine text). seedApplied carries no customer sentence in the spec today, so there is no producer sentence to prefer. The package-less loop uses the plain pack sentence without the draft name, which is how the chat line and the batch door already word it; no locale key is added.

The changeset is patch on @object-ui/app-shell. No locale keys, props or exports change.

Tests

New file usePublishAllDrafts.seedWarn-35141.test.tsx (its own file because I18nProvider installs a module-level i18next global, as the sibling userMessage-34553 pin does), with the shipped en and zh-Hans packs:

  • a package batch whose seedApplied failed with engine text: title is the pack's seedWarn, description is the pack's seedFailed, the engine text is absent;
  • a package-less seed that failed with engine text: same;
  • a package-less seed that failed with no text: description is the pack sentence, not the English fallback;
  • CONTROL: a package-less seed that loaded raises no warning and one success toast.
Harness reading on the unfixed source (zh-Hans included) = ablation, then restore

The fix was committed first (3cf598f). The mutation leg restored usePublishAllDrafts.ts from the base commit 0188989 (tree only); on-disk proof: the old engine-text push spelling counted 1, the new let seedFailed = false counted 0. The subject resolves through source (relative import), so no build sits between the edit and the run.

Expected: "示例数据未能加载。"
Received: "seed apply stopped at the seed for object 'crm_task': Reference not found: owner = "ann""
Expected: "示例数据未能加载。"
Received: "crm_sample_rows: sample data failed to load"
 Test Files  1 failed (1)
      Tests  6 failed | 2 passed (8)
os-verify-lock: VERDICT command-exit 1

The 6 failures are the six defect cases (3 per locale); the 2 passes are the CONTROL cases. Restore: git checkout HEAD -- FILE, then the file's hash equals the HEAD blob (76a3fe6ba1) and git diff HEAD is empty.

Green on the fixed head
pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/preview/__tests__/usePublishAllDrafts
 Test Files  6 passed (6)
      Tests  30 passed (30)
os-verify-lock: VERDICT command-exit 0

All six usePublishAllDrafts pin files, including the existing objectstack#32984 case that asserts the pack key as the description.

Acceptance notes

  • Same family, outside this card's file fence: the AI chat page's publish door (AiChatPage.tsx, the console.ai.seedWarn toast in onPublishDrafts) also puts seedApplied.error (engine text) into the description, and with no error it puts String(seedApplied.errors[0]), which for a structured error row reads [object Object]. Reported to the seat for filing, not fixed here.
  • The full app-shell suite and the wide UI run are left to CI (Test UI, Type Check UI); locally only the targeted pins, the app-shell type-check and the derived gate list ran.

Verification

All local readings are on head 3cf598f (objectstack-ai/objectstack).

  • App-shell type-check (pnpm --filter @object-ui/app-shell run type-check, both tsconfig.json and tsconfig.test.json; --listFilesOnly on the test project lists the new pin): os-verify-lock: VERDICT command-exit 0.
  • Derived gate list (node scripts/pm/dispatch-gates.mjs --commands, change set from git): 38 families, all exit 0, plus pnpm check:changeset-fixed (its roster sits under .changeset/). Reconciliation: dispatch-gates --ran: 38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED (a DERIVED zero — all 38 recorded an exit code and none of them is 3).
  • pnpm --dir ui run check:new-line-citations: VERDICT new-cross-file-line-citations: 0 new citation(s).
  • node scripts/pm/overlap-check.mjs: VERDICT clean exit 0 (merges cleanly into origin/main 0188989).
  • Left to CI: the full app-shell suite and the wide UI run (Test UI, Type Check UI, Lint UI), and every repo-wide check:* scan.
Derived gates, each with its exit code
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-sdui-manifest.mjs :: exit 0
node scripts/check-sdui-manifest.mjs --self-test :: exit 0
node scripts/ci/snapshot-next.mjs --self-test :: exit 0
node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --dir ui exec vitest run scripts/ :: exit 0
pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0
pnpm check:adr-anchors :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:dispatcher-error-vocabulary :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:engine-double-contract :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:published-files :: exit 0
pnpm check:query-options-erasure :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:registry-log-declared :: exit 0
pnpm check:rest-log-spy-declared :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:test-source-alias :: exit 0
pnpm check:tier-file-adoption :: exit 0
pnpm check:type-check-coverage :: exit 0
pnpm check:type-check-debt :: exit 0
pnpm check:undeclared-dep-imports :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:where-matcher :: exit 0
pnpm check:changeset-fixed :: exit 0

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 19, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Final head for L1: 3cf598ff98c8668acc56442e484c2e13d4ed3fc7 · 2026-11-19T03:35Z

  • CI on this head: 41 success, 15 skipped, 0 failed or pending. Mergeable state: clean.
  • Diff 208 lines (3 files): above the 50-line self-landing bar, so the L1-a thread reads it. Clause-②: no · Metadata-protocol: none.
  • Harness reading in zh-Hans and ablation in os-dev report 6998614736 (6 red on the base hook, 2 CONTROL green; restored blob == HEAD). No locale key added.
  • Out-of-scope finding (AiChatPage console.ai.seedWarn) filed by the seat as console AI chat: the seed warning after publishing drafts shows the seed loader's engine text, or "[object Object]" #35303.
  • Body-only edit added the footer lines (head unchanged).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4

维护者速读

席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head 3cf598ff98c8668acc56442e484c2e13d4ed3fc7 · 2026-11-19T03:37Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Landing · area ux-1 · 2026-11-19T03:39Z

Reading Value
check-governed-merges --pr 35301 0 of 3 paths governed, 208 lines → ordinary queue landing
K (merge base..origin/main, first-parent) 8 (< 15)

ACCEPT 6998930010 (L1-a) at head 3cf598ff98c8668acc56442e484c2e13d4ed3fc7. Ready + auto-merge now. #35141 closes on merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants